﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ORS.Web
{
    public partial class ReviewSearch : System.Web.UI.Page
    {
        string s_key;
        DataTable dtsheet;
        ORS.BLL.SearchName rsearch = new ORS.BLL.SearchName();


        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnquery_Click(object sender, EventArgs e)
        {
            if (rbtnqtype.SelectedValue == "0")
            {
                s_key = tbx_title.Text.Trim();
                dtsheet = rsearch.titleSearchReviewDataSet(s_key);
            }
            else if (rbtnqtype.SelectedValue == "1")
            {
                s_key = tbx_author.Text.Trim();
                dtsheet = rsearch.userSearchReviewDataSet(s_key);
            }
            else if (rbtnqtype.SelectedValue == "2")
            {
                s_key = DropDownList1.SelectedItem.Value.Trim();
                dtsheet = rsearch.interestSearchReviewDataSet(s_key);
            }
            else
            {

            }
            gvpaper2.DataSource = dtsheet;
            gvpaper2.DataBind();
        }
    }
}